model load pytorch

173

model load pytorch -

model = TheModelClass(*args, **kwargs)
model.load_state_dict(torch.load(PATH))
model.eval()

how to save a neural network pytorch -

Saving:
	torch.save(model, PATH)


Loading: 
	model = torch.load(PATH)
	model.eval()

Comments

Submit
0 Comments